package cn.com.open.itembank.sqlprovider;

import static org.apache.ibatis.jdbc.SqlBuilder.*;

/**
 * Created by lucky on 2017/9/1.
 */
public class QuestionWriteSqlProvider {
    /**
     * 试题主体生成insert的sql.
     *
     * @return the insert
     */
    public String insert() {
        INSERT_INTO("Question");

        VALUES("questionId", "#{questionId}");
        VALUES("questionTypeId", "#{questionTypeId}");
        VALUES("questionCategory", "#{questionCategory}");
        VALUES("difficulty", "#{difficulty}");
        VALUES("title", "#{title}");
        VALUES("comment", "#{comment}");
        VALUES("score", "#{score}");
        VALUES("keywords", "#{keywords}");
        VALUES("questionAnalysis", "#{questionAnalysis}");
        VALUES("fieldCount", "#{fieldCount}");
        VALUES("creater", "#{creater}");
        VALUES("createTime", "#{createTime}");
        VALUES("status", "#{status}");
        VALUES("isCheck", "#{isCheck}");
        VALUES("checker", "#{checker}");
        VALUES("checkTime", "#{checkTime}");
        VALUES("lastUpdateTime", "#{lastUpdateTime}");
        VALUES("displayCount", "#{displayCount}");
        VALUES("displayTime", "#{displayTime}");
        VALUES("source", "#{source}");
        VALUES("isCourseOnly", "#{isCourseOnly}");
        VALUES("inputType", "#{inputType}");
        VALUES("importType", "#{importType}");
        VALUES("sourceType", "#{sourceType}");
        VALUES("parentQuestionId", "#{parentQuestionId}");
        VALUES("isSubQuestion", "#{isSubQuestion}");
        VALUES("sequenceIndex", "#{sequenceIndex}");
        VALUES("isSubjective", "#{isSubjective}");
        VALUES("shuffle", "#{shuffle}");
        VALUES("questionVersion", "#{questionVersion}");
        VALUES("difference", "#{difference}");
        VALUES("perceiver", "#{perceiver}");
        VALUES("masterLevel", "#{masterLevel}");
        VALUES("responseTime", "#{responseTime}");
        VALUES("questionInnerTypeId", "#{questionInnerTypeId}");
        VALUES("modifier", "#{modifier}");
        VALUES("modifyTime", "#{modifyTime}");
        VALUES("mediaType", "#{mediaType}");
        VALUES("mediaDuration", "#{mediaDuration}");
        VALUES("isPublish", "#{isPublish}");
        VALUES("publisherId", "#{publisherId}");
        VALUES("publishTime", "#{publishTime}");
        VALUES("qualityGrade", "#{qualityGrade}");
        VALUES("useType", "#{useType}");

        return SQL();
    }
}
